broke up into single responsibility methods