pre-refactor

core functionality complete