apply better operation with skip frames and remove a return which may cause missing deleting inputimage