using optimizer to create 2 files