Refactory Collection using class keyword