added real direction controls, a little linear algebra package