changed to rectangular vectors instead of polar