updating to the latest code
need to write some tests