added resources, refactors tests