added SESSION functionality, among other things