remove parentheses
move condition for checking next image