slight changes to make it azure compatible