refactor mariok