working on register api