added drawRect method