simplify and rearrange