refactored register operation.
changed register api operation test.