Added second test version of lp function