Better function execution and printing