added "method" and "data" option, better documentation