commented my code and got the register functioning properly