minor changes, preparing for rewrite