working version with sink()