attempting 2nd exercise of ML