define resource (not finished)