Consider extracting to a function