moved ruby into block