added recursive option
added multiple patterns option