simplify boolean
move fn out
move fn out
move fn out