improved config script