made functions for lx calculation formula and corrected the print formatting