Changed pis_class function to echo the output, not just return it