use correct function name in if statement