simplified calculations
improving syntax, more idiomatic CL