Index variables(lines ll-13) added for clarity