added optimal button puzzle code. Trying to find optimal buttons