improved calculations