add itemClick event, allow passing in of update and input functions