better export and refractoring