it would be a good idea to have this in an object so that you can unit test this behavior