remove redundant assignment
rearrange sanely