Added onchange() method to objects