following the directions from the Data Science lecture