added draw rect function
draw grid
some changes