fixed Firm resource and wrote tests