added check for operation