cause of problem, using wrong function