minor refactor
Made processing simple functions