combined control scripts into one