completed, some variables changed

inside function calculation changed to initials