fix faulty function declaration