Changed to srim capable code