added cut marks and simplify code