database and some modification in data handler