added test
fix registering for internal api