brute force not done and simplfied the eliminate to easier to read