Added basic RCS code, but crashes