updated to modern haskells