extract calculation for sunset and sunrise in separate class