added var to sum variable because in strict mode it is needed