stole external sdcard stuff from petercassetta