final commit: stable version. add handling of the changes states