refactoring overlay position