add initialize function with instance variable for input