made a couple minor changes for good programming practice protocol