documenting the functions in query/session.php