incorporated changes from ryan briones