cleaned up and corrected address passing