combined several buy functions into one, added new helper that will replace the previous two