added onChange method