Added function to other ifs