1. Implemented OnApplySort