adding some code for doing rv fits