lsp: refactoring