change modify_feature.m into function and some little things