some changes in the database transaction and layout