begin to modularize background script