fixing function calls