minor changes, still needs final stage logic sort out