make extent & buffer configurable, close #22