move address handling to directive