added registerAdapter