avoiding repeating scripts