remove duplicated code
work on foldmap
write cut elim rules