lots of updates, adding code