added helper functions and made selection of each feature type flexible to handle other msg typechecks