added better resource structure