removed mem implementation and began changing switch statement