write script with Revealing Module Pattern