working on Brute(assn2)