refactoring addRequiredResource from hook to client