added code to draw rectangle using tiles