reverse caps and types, simplify caps