modifications; removed extra page and use of session