attempt at the last vector problem