working move functions, collapsing still needs some more work.