tip for implementing co-variance matrix