added combinations and counting