calculate square of a number