Final commit before changing to stateless functions working on arrays