updated a couple functions