Modified function for getting address id and replaced it's references