refactor lps