Added address resolving function (Thank you stal).