update as oop and add some features