updated resolution determination code