added check on return