add list squared function