socket and calculating angles using vectors