converting subroutines to include blocks