Merged Eugenio's version & tests passing