updated per xtraeme's comments