using the ring middleware module now instead of rolling my own