added bit combinations code