refact require and import