added session test and updated session.py