first stab at #54, but no optimal ordering yet
closes #54