edited condition to run method