get_divs: more flexible input/output options