Cleaned code for combinations