use one script instead of two