corrected some function calls