input registering and corresponding API