Added functions for cross product and dot product