date algorythm was written by FrostUser