update database implementation; finally done