why am I getting these undefined errors when they're defined in a different file?