removed helper function from solution