added functionality for all function calls and returns