The first to file policy is a world-wide mainstream patent law doctrine used by nearly the whole world save the United States and the Philippines. Based on this policy, even if inventor A made the invention earlier than inventor B, if B filed the patent application to the patent office earlier, B shall be awarded a patent. For example, Bell beat Gray by mere hours, so Bell, not Gray got a patent for the telephone.