I did it this way because that was the behavior of the old compute sun function