Updated a few functions