modification to RA to fix some issues, need more work