updated register api