base extension code