refactoring and move to Marionette