implemented function calls with return value