I want to merge my changes which adds -R resource functionality

This is my commit that I have been working on. Please give me input on improvements if you see anything that needs to be better. Thank you.