simplify code in intention a bit