function call error fixed