major refactor, now trying to deploy