add test func for square func