added sessions and some other stuff