Minor, updating the code to not calculate thigs two times