better drag algorithm
paint bucket mode added