uncomment the if-check and correct the order_by direction