Started rect.d implementation