move some abstract codes from event_lib.py to s_object.py