add support for range requests

UNTESTED