changed lines to rect