Implemented addResource and getRessourceCount. NOT TESTED!