file code optimised