made compilable with latest RS