coding is done, added diagrams, before testing