feature optimization code & logical