logic for editing positions, nodes, empty positions and trades