fix the size function and export more things