move out rale tasks into somewhere more sensible so they can be tested