- refactor to make py.test easier to use