Extracted to function for re-use.