Created a procedure for this script.