added the possibility to use a sequence of given or when values