made it work and used do-end instead of {}