add getRect, cleaned a bit