added closures and compiled