extract (and clarify) heroku_addon function