Lets DRY this too please by moving to shared and adding bucket to params - then update other modules to use new function