private fun findAdjacentIds(knownId: Int, workIdList: List): Pair<Int, Int> {
val sortedIdList = workIdList.sorted()
val index = sortedIdList.indexOf(knownId)
val prevId = if (index > 0) sortedIdList[index - 1] else -1
val nextId = if (index < sortedIdList.size - 1) sortedIdList[index + 1] else -1
return Pair(prevId, nextId)
}