added output, clauses for the same function as previous commit