Rewrite the way we handle base_id, can now works with more than 1