resolved error regarding function call