working on the andrew ng example