Added Logic for Cup Generation