commented some functions