refactored to separate helpers from logic
started using sequel migrations