refactored dynamoloader