using case instead of ifs for the constant selectors