Added rs in database and some basic functionality