more organization in script code