added a new method.
improve set events function.
update a view sample.