move before_address function to puma