added combinations code