fixing function declaration