Note hack: should actually work out what s_char, i.e. what character S is sitting on, is - assigning it to 'f' seems to work for my input but not guaranteed