Final base code