add tests (need to go through)