refactored to be coapp.powershell