quick and dirty code to follow along Ng lectures