Extracted functions.