Improved synth function