Refactor

refactor in dev (should have been done directly)