wrote all tests for registersTest