fixed calling function issue