Implemented the resource handler