added depth param, added support for windows by using subprocess