add sol w/ bit manipulation