using maths stuff are now taken from JS global Math object (replace ^ by pow)