added magsqr methods to vector