Worked on some functions