finished porting over server to new session/document setup