addressed changes by @adamrp