Applying first rules