add beforeInput afterInput