updated with simple 2d linear algerbra functions, and proper vector reflection