modify for not executing double