updated a few functions