added check for options