Fully functioning script.