small fix with function declarations untested