added in manually closing db connection on every page