updated chop algorithm and image removal