changed f^driect calculations