fixing incorrect function call