removed external function lsquare