change how onChange gets defined