tweeked logic for more levels / combine ?