new impl for bottom-up