changed delta calculation