String return p1

changed functions to return string instead of cout