rewritten init script