dbase functions fixed, session code added