correction: added upcount to internal recursion.
cleanup