Using methods in a script