function name not declared in this scope... but it is!