tidied up registering