I would like this function as  a closure, it just makes it easier to read the code (imho).