added clear and add entity in physengine