added variables, outputs, and procedure.