rearranged some code, now mostly stt is missing