modified to work with Rexle