reorganize startup script