trying out using fold_right; think deeper about types