Lab1 rewritten