A device to extract energy from water waves