refactored motoradapter