assigment 3 work + some reorganization