buged code for the SR