returned to basics, refactored