removed redundant stuff from feature loop