Fixed register
Added test functionality