improvement of scripts