working comments, some refractoring, edited  changed portfolio tests