migrated to upstart, refactoring