update dependencies
use oop and add some comments