improved features code.