optimised import and reformatted code