integrated getAddress and fixed bugs

find faster method of getAddress