add support for delay_once_until_next_state
merge master branch