added data output option