separate function definitions into blocks during code generation