pulsesync implemented (might have some minor timing issues)