broke Resource class out of Resources and wrote a test