main unit and integration tests written and passed