Added functions

Also commented functions