you dont have to use $calc inside the $calc function, so one time $calc should be sufficient, just use brackets