sequence handling update
make default set-0d return value directly
set-0d for nil
improved tests for nil setting