change all var to class members, and use bind(obj) to keep obj scope for callbacks