options now object, added recursive option, fixes #3