use which instead of exec