working on register endpoint