adds adds calculate points function and tests