hoisted variables in compile function