updated and tested script on fresh ubuntu