refactor and cleanup - in progress