Added perfect function, will return in a few hours to finish up set.