sequence builder: changing / removing events from sequence
(cherry picked from commit eeea887)
added validation on input parameters
(cherry picked from commit b333b30)