implemented Resource class