merged methods back into process function to keep functionality together