overhauled the MarketController class, more loops, a few switch statements seemed appropriate and i'm not sure if they were the best decision