added private functions and the ability to call functions in class definitions