implemented register handler