some improved for prompt script