added valid choice calculation