able to draw rectangle using mouse coordinates