Changed global call to function call for options