moved update listener into init function