re-factoring calculate block