Made some changes to the functions