implemented an early-version of eqs. 4-8