Move frame seeking logic to a separate method