fixed the output of several of the functions