Changed to using resource instead ofrequire.