needs less if/then