implement LPA algorithm (#110)