fixed Lab4 output