add code for ruby blocks