perpendicular Vector smaller code