implemented resource handler