segment faulty occured in add_feature()