very rough starting code
basic working script - needs to be run from applescript editor