'function was not declared in this scope' error help?