added has_begin test