Fixing function syntax