changed corner references for brevity and readability