start of session code