added check for "data" argument