updated base code