Moar vector stuff; question added (read code before running)