working on register controller