added id to rect
updated to newer api