better way of generating perpendicular vector