adding template code from internet and starting my own realtime backSub codes