Updated many functions