adding resources logic.