small changes to correct poor programming