plan and testing of onchange-event.
damn big refactoring is finally done.