moving parseImage into a curried fn for reusability