bug caused by undefined function added