Lab3 improved