Creates getLCS method