added default sorting for data coming from the database