refactor extension helpers