Running final calculations