types optimization