fixing function call