added ST and required ID declaration plus some IR generation