updated code to work with powershell