added reverse option