revise layout calculator to use size of node
revise layout and drawing logic